package com.vanke.activiti.service.impl;

import com.vanke.activiti.common.response.ResultResponse;
import com.vanke.activiti.pojo.dto.FormDTO;
import com.vanke.activiti.service.DeploymentProcessService;
import lombok.extern.slf4j.Slf4j;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.repository.Deployment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

//@Slf4j
//@Service
//public class DeploymentProcessServiceImpl implements DeploymentProcessService {
//
//    @Resource
//    private ProcessEngine processEngine;
//
//
//    @Override
//    public ResultResponse deployProcessDifinitionByFormInfo(FormDTO formDTO) {
//        Deployment deployment = processEngine.getRepositoryService()
//                .createDeployment()
//                .name("activity流程实例")
//                .addClasspathResource("processes/holiday.bpmn")
//                .deploy();
//        log.info("deployProcessDifinitionByFormInfo 返回信息 :Deployment {} ", deployment.toString());
//        return ResultResponse.getSucceed(deployment);
//    }
//}
